package unit_6;
import java.util.Scanner;
public class Demo02 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入两个字符串:");
        String str1 = sc.nextLine();
        String str2 = sc.nextLine();
        int ans = str1.indexOf(str2);
        if(ans == -1)
            System.out.println(str2 + "不是" + str1 + "的子串");
        else
            System.out.println(str2 + "是" + str1 + "的子串");
    }
}
